﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using EntGuayasSLA.BL;
using EntGuayasSLA.BL.Listas;
using EntGuayasSLA.BL.Listas.Criterias;
using Ext.Net;

namespace EGuayas.Web
{
    public partial class pgEncriptar : Page
    {
        #region Set-Session
          
        #endregion Set-Session

        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                //if (!X.IsAjaxRequest)
                //{            
                //    var path = MapPath("~/Resources/");
                //    path = path + "EVA_ConsultaResultadosParalelo.pdf";
                //    System.IO.File.Encrypt(path);
                //}
            }
            catch (Exception ex)
            {
                RegistrarLog(ex);
            }
        }

        private void RegistrarLog(Exception ex)
        {
            
        }
      
        protected void btnLogin_Click(object sender, DirectEventArgs e)
        {
            try
            {
                 
                    string claveOnly = e.ExtraParams["clave"];
                    //Caso de usuarios con clave no encriptada
                    string password  = Seguridad.Encriptar(claveOnly);
                    this.txtUsername.Text = password;
                   
            }
            catch (Exception ex)
            {
                RegistrarLog(ex);
            }
        }
    }
}